package it.polimi.authentication.ejb.usermanagement.dto;


import java.util.Date;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

import org.hibernate.validator.constraints.NotEmpty;

public class UserDTO {
	
	@Pattern(regexp="[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?",
            message="invalid email")
	private String email;
	
	@NotEmpty
    private String name;
	@NotEmpty
    private String surname;
	@NotNull
    private Date birthdate;
	@NotEmpty
    private String password;
	
  
	public String getName() {
        return name;
    } 
 
    public void setName(String name) {
        this.name =name ;
    }

    public String getSurname() {
        return surname;
    } 
 
    public void setSurname(String surname) {
        this.surname = surname;
    }
    public Date getBirthdate() {
        return birthdate;
    } 
 
    public void setBirthdate(Date date) {
        this.birthdate =date ;
    }
    public String getEmail() {
        return email;
    } 
 
    public void setEmail(String email) {
        this.email = email;
    }
  
    public String getPassword() {
        return password;
    }
     
    public void setPassword(String password) {
        this.password = password;
    }
     

}
